from tkinter import*
print("Введите сдвижение по оси X")
x=int(input())
print("Введите сдвижение по оси Y")
y=int(input())
print("Введите сдвижение по оси n")
n=int(input())

if n==0 and x>=0 and x<=500 and y>=0 and y<=500:
     pass
else:
      if n>0 and 0*n+x>=0 and 30*n+x<=500 and 0*n+y>=0 and 20*n+y<=500:
        pass
      else:
        if n<0 and 30*n+x>=0 and 0*n+x<=500 and 20*n+y>=0 and 0*n+y<=500:
          pass
        else: 
          print("Размер фигуры превышает размер поля")
          exit()
    





      
cords=[0,0,0,20,30,20,30,10,20,0,20,10,10,10,0,10]
root=Tk()
root.title("ИТ- МАРОФОН")
root.geometry("500x500")

conwas=Canvas(bg="white",width=500,height=500)
conwas.pack(anchor=CENTER,expand=1)

conwas.create_polygon(cords[0]*n+x,cords[1]*n+y,
                      cords[2]*n+x,cords[3]*n+y,
                      cords[4]*n+x,cords[5]*n+y,
                      cords[6]*n+x,cords[7]*n+y,
                      cords[8]*n+x,cords[9]*n+y,
                      cords[10]*n+x,cords[11]*n+y,
                      cords[12]*n+x,cords[13]*n+y,
                      cords[14]*n+x,cords[15]*n+y)






root.mainloop()
